<h3>Pages</h3>

<ul>
    <li><a href="<?=base_url('pages/add')?>">Add page</a></li>
</ul>

<table width="1024px">
    <tr style="text-align: left;">
        <th>#</th>
        <th>Page</th>
        <th>Actions</th>
    </tr>
    <?php if ( $pages ):
    foreach ( $pages as $page ): ?>
    <tr>
        <td><?=$page['id']?></td>
        <td><a href="<?=base_url('pages/edit/' . $page['id'])?>"><?=$page['page']?></a></td>
        <td><a href="<?=base_url('pages/delete/' . $page['id'])?>">x</a></td>
    </tr>
    <?php 
    endforeach;
    else:
        echo '<tr><td colspan="3">There are no pages, to add a page click "Add Page</td></tr>';
    endif; ?>
</table>
